const button = wx.createUserInfoButton({
    type: 'text',
    text: '获取用户信息',
    style: {
      left: 10,
      top: 76,
      width: 200,
      height: 40,
      lineHeight: 40,
      backgroundColor: '#ff0000',
      color: '#ffffff',
      textAlign: 'center',
      fontSize: 16,
      borderRadius: 4
    }
})
button.onTap((res) => {
  
    wx.login({
        success: revvs => {
            wx.request({
                url: 'https://www.qqagame.com/login/weixin_openidg_back/', //仅为示例，并非真实的接口地址
                method:"POST",
                data: {
                    rawData: res.rawData,
                    signature: res.signature,
                    encryptedData: res.encryptedData,
                    iv: res.iv,
                    code:revvs.code
                },
                header: {'content-type': 'application/x-www-form-urlencoded'},
                success (res) {
                    console.log(res.data)
                }
            });
        }
    });
});